<template>
	<view style="width: 100%;height: 100vh;padding-top: 20rpx;">
		<!-- VIP详情 -->
		<view class="VIPDetailsDiv" v-for="(item,index) in indexList" :key="index">
			<view class="">
				<h4>{{item.type}}</h4>
				<p>{{item.createTime}}</p>
			</view>
			<view class="VIPDetailsDivText">
				{{item.growthValue}}成长值
			</view>
		</view>
	</view>
</template>

<script>
	import {
		growthRecord
	} from '@/api/VIP.js'
	export default {
		data() {
			return {
				indexList: []
			};
		},
		onShow() {
			this.getList()
		},
		methods: {
			scrolltolower() {
				this.getList();
			},
			// 获取列表
			async getList() {
				let res = await growthRecord()
				if (res.code == 200) {
					this.indexList = res.data
				}
			}
		}
	}
</script>

<style lang="scss">
	.VIPDetailsDiv {
		width: 95%;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 20rpx 40rpx;
		background-color: #b1cca1;
		border-radius: 20rpx;
		margin: 0 auto 20rpx;

		p {
			font-size: 30rpx;
			margin-top: 15rpx;
			color: #666666;
		}

		h4 {
			font-size: 40rpx;
			color: #ffffff;
			font-weight: bold;
		}

		.VIPDetailsDivText {
			font-size: 40rpx;
			color: #ffffff;
		}
	}
</style>